windows: enable winapi std for RawHandle interop#366
Open
iiTONELOC wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cargo resolver 2 keeps features enabled only by dev-dependencies out of normal dependencies.
Under resolver 2, a Windows consumer fails at
DeviceCapabilities::new(self.file.as_raw_handle())becausecore::ffi::c_voidandwinapi::ctypes::c_voidare different types. The package's legacy-resolver dev build hides this becauserpasswordenableswinapi/std.Enabling
stdon the direct Windowswinapidependency makes the raw-handle types compatible without relying on feature unification from an unrelated dev-dependency.A minimal resolver-2 consumer on Rust 1.97 targeting
x86_64-pc-windows-msvcfails before this patch and passes afterward.cargo test --features crypto_dummy --no-default-featuresalso passes.